﻿@model IEnumerable<VoiceAd.Models.tblContent>
@{
    ViewBag.Title = "Content";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<h2>
    Content</h2>
<p>
    @Html.ActionLink("Create New", "CreateContent")
</p>
<table style="width: 100%;">
    <tr>
        <th style="width: 10%;">
            Tiêu đề
        </th>
        <th>
            Nội dung
        </th>
        <th style="width: 10%;">
        </th>
    </tr>
    @foreach (var item in Model)
    {
        <tr>
            <td>
                @item.Title_VI
            </td>
            <td>
                @Html.Raw(@item.Body_VI)
            </td>
            <td>
                @Html.ActionLink("Edit", "EditContent", new { id = item.Id }) |
                @Html.ActionLink("Delete", "DeleteContent", new { id = item.Id }, new { onclick = "return confirm('Bạn có muốn xóa tin này không ?')" })
            </td>
        </tr>
    }
</table>
<br />
<div>
    @Html.ActionLink("Trang chủ", "Index")
</div>
